const { defineConfig } = require("@vue/cli-service");
const Mock = require("mockjs");
const data = Mock.mock({
  "list|10": [{
    "id": "@id",
    "image": "@image(150x120, @color)",
    "title": "@ctitle",
    "desc": "@cword(10, 20)"
  }]
});
module.exports = defineConfig({
  transpileDependencies: true,
  devServer: {
    setupMiddlewares(middlewares, devServer) {
      devServer.app.get('/list', (req, res) => res.send(data.list))
      return middlewares
    }
  }
});
